<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DescriptionServiceImpl
 *
 * @author krisada.thiangtham
 */
class DescriptionServiceImpl {

    //put your code here
    private $dispatcher;

    public function __construct(DescriptionDao $dispatcher) {
        return $this->dispatcher = $dispatcher;
    }

    public function action($action) {
        return $this->dispatcher->dispatch($action);
    }

    public function createNewDescription($productID, $productName, $productDescription, $createDateTime, $menuID, $pageType) {
        return $this->dispatcher->createNewDescription($productID, $productName, $productDescription, $createDateTime, $menuID, $pageType);
    }

    public function deleteDescriptionByID($descID) {
        return $this->dispatcher->deleteDescriptionByID($descID);
    }

    public function updateDescription($descID, $descName, $productDescription, $pageType) {
        return $this->dispatcher->updateDescription($descID, $descName, $productDescription, $pageType);
    }

    public function getAllDescriptionByMenuID($menuID) {
        return $this->dispatcher->getAllDescriptionByMenuID($menuID);
    }

    public function getProductDescriptionByID($descID) {
        return $this->dispatcher->getProductDescriptionByID($descID);
    }

}
